package com.smart.manager.union.mall.models;

import com.smart.common.entities.core.BaseLongModel;
import com.smart.manager.union.mall.enums.MallGoodsState;
import com.smart.manager.union.mall.views.KindView;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;


/**
 * 狼山鸡蛋配置信息
 *
 * @author leo
 * @date 2023/07/26
 */
@EqualsAndHashCode(callSuper = true)
@Entity
@Accessors(chain = true)
@Data
public class UnionMallGoods extends BaseLongModel {


    @ApiModelProperty("商品标题")
    private String title;

    @ApiModelProperty("可用库存数")
    private Integer stockTotal;


    @ApiModelProperty("商品主图")
    private String picture;

    @ApiModelProperty("商品详情")
    private String detail;

    @ApiModelProperty("标准售价")
    private Integer stdPrice;


    @ApiModelProperty("折扣售价")
    private Integer disPrice;


    @ApiModelProperty("销售数量")
    private Integer saleCount;



    @ApiModelProperty("所属类型")
    @ManyToOne
    @JoinColumn(name = "kind" ,referencedColumnName = "code")
    private KindView kind;


    @ApiModelProperty("商品状态")
    private MallGoodsState state;

}
